package com.xr.miniprogram.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xr.miniprogram.domain.MiniProgramMenu;
import com.xr.miniprogram.domain.vo.MiniProgramMenuTree;

import java.util.List;

public interface IMiniProgramMenuService extends IService<MiniProgramMenu> {
    /**
     * 获取服务菜单列表
     * @return
     */
    List<MiniProgramMenu> getMenuList();

    /**
     * 获取服务菜单树
     * @return
     */
    List<MiniProgramMenuTree> getMenuTreeList();

    /**
    * description: 根据菜单id获取菜单信息
    * @author: wls
    * @date: 2023/8/30 15:31
    * @param:  menuId
    * @return:
    */
    MiniProgramMenu getMenuById(Long menuId);

    /**
     * description: 校验服务菜单名称是否唯一
     * @author: wls
     * @date: 2023/8/30 15:04
     * @param: miniProgramMenu
     * @return:
     */
    boolean checkServiceNameUnique(MiniProgramMenu miniProgramMenu);

    /**
    * description: 新增服务菜单
    * @author: wls
    * @date: 2023/8/30 15:32
    * @param: boolean
    * @return:
    */
    boolean addMenu(MiniProgramMenu miniProgramMenu);

    /**
    * description: 修改服务菜单
    * @author: wls
    * @date: 2023/8/30 15:32
    * @param: boolean
    * @return:
    */
    boolean updateMenu(MiniProgramMenu miniProgramMenu);


    /**
     * 删除服务菜单
     * @param menuId
     * @return
     */
    boolean deleteMenu(Long menuId);
}
